package com.exercise.api.feign;

import com.exercise.commons.param.PaymentRecordQueryParam;
import com.exercise.commons.vo.PaymentRecord;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "DeWu-storage-service",contextId = "paymentApi")
public interface PaymentRecordApiFeign {

    /**
     * 添加或修改支付记录
     *
     * @return PaymentRecord
     */
    @GetMapping("/PaymentRecord/save")
    PaymentRecord save(@RequestBody PaymentRecord paymentRecord);

    /**
     * 查询支付记录
     *
     * @param queryParam 查询参数
     * @return List<PaymentRecord>
     */
    @GetMapping("/PaymentRecord/query")
    List<PaymentRecord> query(@RequestBody PaymentRecordQueryParam queryParam);

    /**
     * 更新状态
     *
     * @param paymentRecord 支付记录
     * @return PaymentRecord
     */
    @GetMapping("/PaymentRecord/updateStatus")
    PaymentRecord updateStatus(@RequestBody PaymentRecord paymentRecord);
}
